import Main from "@/layouts/main.vue";
import simple from "@/layouts/simple.vue";
import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: Main,
      children: [
        {
          path: "",
          name: "Home",
          component: () => import("@/views/dashboard/index.vue"),
        },
        {
          path: "region",
          name: "RollCall",
          component: () => import("@/views/roll-call/index.vue"),
        },
        {
          path: "manageclass",
          name: "ManageClass",
          component: () => import("@/views/manageclass/index.vue"),
        },
        {
          path: "createclass",
          name: "CreateClass",
          component: () => import("@/views/manageclass/create.vue"),
        },
        {
          path: 'class/:classNo/:className',
          name: 'ClassDetails',
          component: () => import("@/views/class-detail/index.vue")
        }
      ],
    },
    {
      path: '/profile',
      component: simple,
      children: [
        { path: '', name: 'Profile', component: () => import('@/views/profile/index.vue') },
      ],
    },
  ],
});

export default router;
